<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArGPSConnector Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArGPSConnector.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArGPSConnector-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArGPSConnector Class Reference<div class="ingroups"><a class="el" href="group__OptionalClasses.html">Optional Classes</a> &#124; <a class="el" href="group__DeviceClasses.html">Device Interface Classes</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot parameter file and command-line arguments.  
 <a href="classArGPSConnector.html#details">More...</a></p>

<p><code>#include &lt;ArGPSConnector.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ab7ddee30070f15cf1bcc8ec6cb4ca312"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312">GPSType</a> { <br />
&#160;&#160;<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312a915b3f171473120af03da3280df8452d">Standard</a>, 
<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312af8982f5382ba2f66d3d8e8f57ca26027">Novatel</a>, 
<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312a66aac37f643b6fbe2982e3b6311deb44">Trimble</a>, 
<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312a7633cc51ddfaaaea2b0cbfbd0a50f071">Invalid</a>, 
<br />
&#160;&#160;<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312a30c85e3421653012054e970146fd9d75">NovatelSPAN</a>, 
<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312adf049b3e1eec1403202c70dc1058fa88">Simulator</a>
<br />
 }<tr class="memdesc:ab7ddee30070f15cf1bcc8ec6cb4ca312"><td class="mdescLeft">&#160;</td><td class="mdescRight">Device type identifiers.  <a href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ab7ddee30070f15cf1bcc8ec6cb4ca312"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a74cd02bcbf766e9d36d59e917ef14010"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a74cd02bcbf766e9d36d59e917ef14010"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ArGPSConnector</b> (<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *argParser)</td></tr>
<tr class="separator:a74cd02bcbf766e9d36d59e917ef14010"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ceecc898a2f2466fbd63aaedbe0c0d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArGPS.html">ArGPS</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArGPSConnector.html#a3ceecc898a2f2466fbd63aaedbe0c0d9">create</a> (<a class="el" href="classArRobot.html">ArRobot</a> *robot=NULL)</td></tr>
<tr class="memdesc:a3ceecc898a2f2466fbd63aaedbe0c0d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new GPS object (may be an <a class="el" href="classArGPS.html" title="GPS Device Interface. ">ArGPS</a> subclass based on device type) and a device connection for that GPS.  <a href="#a3ceecc898a2f2466fbd63aaedbe0c0d9">More...</a><br /></td></tr>
<tr class="separator:a3ceecc898a2f2466fbd63aaedbe0c0d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a58ea7f81bc75b8ddeea820ac541c48"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArGPS.html">ArGPS</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArGPSConnector.html#a4a58ea7f81bc75b8ddeea820ac541c48">createGPS</a> (<a class="el" href="classArRobot.html">ArRobot</a> *robot=NULL)</td></tr>
<tr class="memdesc:a4a58ea7f81bc75b8ddeea820ac541c48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new GPS object (may be an <a class="el" href="classArGPS.html" title="GPS Device Interface. ">ArGPS</a> subclass based on device type) and a device connection for that GPS.  <a href="#a4a58ea7f81bc75b8ddeea820ac541c48">More...</a><br /></td></tr>
<tr class="separator:a4a58ea7f81bc75b8ddeea820ac541c48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09764fe026994ccb2377ce0119bb876c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09764fe026994ccb2377ce0119bb876c"></a>
<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312">GPSType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getGPSType</b> () const </td></tr>
<tr class="separator:a09764fe026994ccb2377ce0119bb876c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24353f3e7d7e1b37e52866de483c73ad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24353f3e7d7e1b37e52866de483c73ad"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArGPSConnector.html#a24353f3e7d7e1b37e52866de483c73ad">parseArgs</a> ()</td></tr>
<tr class="memdesc:a24353f3e7d7e1b37e52866de483c73ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets command line arguments. <br /></td></tr>
<tr class="separator:a24353f3e7d7e1b37e52866de483c73ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a1e8471bd28e2b45bf3a9da707736ac87"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1e8471bd28e2b45bf3a9da707736ac87"></a>
<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312">GPSType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>deviceTypeFromString</b> (const char *str)</td></tr>
<tr class="separator:a1e8471bd28e2b45bf3a9da707736ac87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cb9ba89459512cca5b8b58f271951bf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1cb9ba89459512cca5b8b58f271951bf"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArGPSConnector.html#a1cb9ba89459512cca5b8b58f271951bf">logOptions</a> ()</td></tr>
<tr class="memdesc:a1cb9ba89459512cca5b8b58f271951bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log argument option information. <br /></td></tr>
<tr class="separator:a1cb9ba89459512cca5b8b58f271951bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a878a5df9959447834722d658f2652139"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a878a5df9959447834722d658f2652139"></a>
<a class="el" href="classArArgumentParser.html">ArArgumentParser</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myArgParser</b></td></tr>
<tr class="separator:a878a5df9959447834722d658f2652139"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad97a4e055e2adcc094868b7ce0c0616c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad97a4e055e2adcc094868b7ce0c0616c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myBaud</b></td></tr>
<tr class="separator:ad97a4e055e2adcc094868b7ce0c0616c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8170ca7b7f26e9f3276ce3c6e7c85f1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8170ca7b7f26e9f3276ce3c6e7c85f1"></a>
<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myDeviceCon</b></td></tr>
<tr class="separator:ac8170ca7b7f26e9f3276ce3c6e7c85f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae100b9a567e16149651f469f144a1580"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae100b9a567e16149651f469f144a1580"></a>
<a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312">GPSType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myDeviceType</b></td></tr>
<tr class="separator:ae100b9a567e16149651f469f144a1580"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6ab7b38c093658d3e50f874dadeb078"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6ab7b38c093658d3e50f874dadeb078"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArGPSConnector.html">ArGPSConnector</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myLogArgsCallback</b></td></tr>
<tr class="separator:ab6ab7b38c093658d3e50f874dadeb078"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66c91302bd5c25c697406d02eda1ba60"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66c91302bd5c25c697406d02eda1ba60"></a>
<a class="el" href="classArRetFunctorC.html">ArRetFunctorC</a>&lt; bool, <a class="el" href="classArGPSConnector.html">ArGPSConnector</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myParseArgsCallback</b></td></tr>
<tr class="separator:a66c91302bd5c25c697406d02eda1ba60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13b4563a5fc777ddf182a54a1b9df783"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13b4563a5fc777ddf182a54a1b9df783"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>myPort</b></td></tr>
<tr class="separator:a13b4563a5fc777ddf182a54a1b9df783"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af52cadf24f7cebcfad8e302993a6bd4e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af52cadf24f7cebcfad8e302993a6bd4e"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><b>myTCPHost</b></td></tr>
<tr class="separator:af52cadf24f7cebcfad8e302993a6bd4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1b9b37f7463a94f6a85f9ccf4072bcd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa1b9b37f7463a94f6a85f9ccf4072bcd"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>myTCPPort</b></td></tr>
<tr class="separator:aa1b9b37f7463a94f6a85f9ccf4072bcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot parameter file and command-line arguments. </p>
<p>First, create an <a class="el" href="classArGPSConnector.html" title="Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot para...">ArGPSConnector</a> object before calling <a class="el" href="classAria.html#a1b090c01d88bb420b8cf8e0384d25ee1" title="Parses the arguments for the program (calls all the callbacks added with addParseArgsCB()) ...">Aria::parseArgs()</a>. After connecting to the robot, call <a class="el" href="classAria.html#a1b090c01d88bb420b8cf8e0384d25ee1" title="Parses the arguments for the program (calls all the callbacks added with addParseArgsCB()) ...">Aria::parseArgs()</a>. Then, call <a class="el" href="classArGPSConnector.html#a4a58ea7f81bc75b8ddeea820ac541c48" title="Create a new GPS object (may be an ArGPS subclass based on device type) and a device connection for t...">createGPS()</a> to create the GPS object.</p>
<p><a class="el" href="classArGPSConnector.html" title="Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot para...">ArGPSConnector</a> can connect to a Novatel GPS ("novatel" type), Trimble AgGPS ("trimble" type), or any GPS supporting the NMEA standard protocol ("standard" type), if that GPS does not need any special commands to initialize.</p>
<dl class="section note"><dt>Note</dt><dd>The device connection object created by <a class="el" href="classArGPSConnector.html" title="Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot para...">ArGPSConnector</a> is destroyed when <a class="el" href="classArGPSConnector.html" title="Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot para...">ArGPSConnector</a> is destroyed. Therefore, you must not destroy an <a class="el" href="classArGPSConnector.html" title="Factory for creating GPS interface object (for any kind of GPS supported by ARIA) based on robot para...">ArGPSConnector</a> while its associated <a class="el" href="classArGPS.html" title="GPS Device Interface. ">ArGPS</a> is in use.</dd></dl>
<p>The following command-line arguments are checked: </p><pre class="fragment">GPS options:
-gpsType &lt;standard|novatel|novatelspan|trimble|sim&gt;	Select GPS device type (default: standard)
-gpsPort &lt;gpsSerialPort&gt;	Use the given serial port (default: /dev/ttyS1)
-gpsBaud &lt;gpsSerialBaudRate&gt;	Use the given serial Baud rate (default: 9600)
-remoteGpsTcpHost &lt;host&gt;	Use a TCP connection instead of serial, and connect to remote host &lt;host&gt;
-remoteGpsTcpPort &lt;host&gt;	Use the given port number for TCP connection, if using TCP. (default 8103)
</pre><p>Only one GPS device may be configured and connected to by this object. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="gpsExample_8cpp-example.html#_a5">gpsExample.cpp</a>, and <a class="el" href="gpsRobotTaskExample_8cpp-example.html#_a10">gpsRobotTaskExample.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="ab7ddee30070f15cf1bcc8ec6cb4ca312"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classArGPSConnector.html#ab7ddee30070f15cf1bcc8ec6cb4ca312">ArGPSConnector::GPSType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Device type identifiers. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ab7ddee30070f15cf1bcc8ec6cb4ca312a915b3f171473120af03da3280df8452d"></a>Standard&#160;</td><td class="fielddoc">
<p>For a standard NMEA GPS device (no extra initialization or interpretation needed) accessible using <a class="el" href="classArGPS.html" title="GPS Device Interface. ">ArGPS</a>. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ab7ddee30070f15cf1bcc8ec6cb4ca312af8982f5382ba2f66d3d8e8f57ca26027"></a>Novatel&#160;</td><td class="fielddoc">
<p>For a Novatel device accessible using <a class="el" href="classArNovatelGPS.html" title="GPS subclass to support the NovAtel ProPak G2 and other NovAtel &quot;OEM4&quot; devices. ">ArNovatelGPS</a>. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ab7ddee30070f15cf1bcc8ec6cb4ca312a66aac37f643b6fbe2982e3b6311deb44"></a>Trimble&#160;</td><td class="fielddoc">
<p>For a Trimble device accessible using <a class="el" href="classArTrimbleGPS.html" title="GPS subclass to support the Trimble AgGPS and other Trimble GPS devices. ">ArTrimbleGPS</a>. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ab7ddee30070f15cf1bcc8ec6cb4ca312a7633cc51ddfaaaea2b0cbfbd0a50f071"></a>Invalid&#160;</td><td class="fielddoc">
<p>Not set or invalid. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ab7ddee30070f15cf1bcc8ec6cb4ca312a30c85e3421653012054e970146fd9d75"></a>NovatelSPAN&#160;</td><td class="fielddoc">
<p>Novatel SPAN. </p>
<dl class="section since"><dt>Since</dt><dd><a class="el" href="classAria.html" title="Contains global initialization, deinitialization and other global functions. ">Aria</a> 2.7.2 </dd></dl>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ab7ddee30070f15cf1bcc8ec6cb4ca312adf049b3e1eec1403202c70dc1058fa88"></a>Simulator&#160;</td><td class="fielddoc">
<p>Simulated (program must set dummy positions) </p>
<dl class="section since"><dt>Since</dt><dd><a class="el" href="classAria.html" title="Contains global initialization, deinitialization and other global functions. ">Aria</a> 2.7.6 </dd></dl>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3ceecc898a2f2466fbd63aaedbe0c0d9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArGPS.html">ArGPS</a>* ArGPSConnector::create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a new GPS object (may be an <a class="el" href="classArGPS.html" title="GPS Device Interface. ">ArGPS</a> subclass based on device type) and a device connection for that GPS. </p>
<p>Use <a class="el" href="classArGPS.html#a1e42274140dda87104aee8198ba26932" title="Same as connect(). ">ArGPS::blockingConnect()</a> to open the connection.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">robot</td><td>If not NULL, obtain default values for GPS type, port and baud from this robot's parameters (given in parameter file), for any of these not set from command-line arguments in <a class="el" href="classArGPSConnector.html#a24353f3e7d7e1b37e52866de483c73ad" title="Gets command line arguments. ">parseArgs()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NULL if there was an error creating a GPS object or an error creating and opening its device connection. Otherwise, return the new GPS object. </dd></dl>

</div>
</div>
<a class="anchor" id="a4a58ea7f81bc75b8ddeea820ac541c48"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArGPS.html">ArGPS</a> * ArGPSConnector::createGPS </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRobot.html">ArRobot</a> *&#160;</td>
          <td class="paramname"><em>robot</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new GPS object (may be an <a class="el" href="classArGPS.html" title="GPS Device Interface. ">ArGPS</a> subclass based on device type) and a device connection for that GPS. </p>
<p>Use <a class="el" href="classArGPS.html#a1e42274140dda87104aee8198ba26932" title="Same as connect(). ">ArGPS::blockingConnect()</a> to open the connection.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">robot</td><td>If not NULL, obtain default values for GPS type, port and baud from this robot's parameters (given in parameter file), for any of these not set from command-line arguments in <a class="el" href="classArGPSConnector.html#a24353f3e7d7e1b37e52866de483c73ad" title="Gets command line arguments. ">parseArgs()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NULL if there was an error creating a GPS object or an error creating and opening its device connection. Otherwise, return the new GPS object. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="gpsExample_8cpp-example.html#a18">gpsExample.cpp</a>, and <a class="el" href="gpsRobotTaskExample_8cpp-example.html#a26">gpsRobotTaskExample.cpp</a>.</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArGPSConnector.h</li>
<li>ArGPSConnector.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArGPSConnector.html">ArGPSConnector</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
